#include "usart_printf.h"

void u1_printf(char* fmt,...){
    uint8_t buffer[200];
    uint16_t i;
    va_list ap;
    va_start(ap,fmt);          			
    i = vsprintf(buffer,fmt,ap);	                
    va_end(ap);
	
    HAL_UART_Transmit(&huart1,(uint8_t *)buffer,i,0x00ff);
}

void u2_printf(char* fmt,...){
    uint8_t buffer[200];
    uint16_t i;
    va_list ap;
    va_start(ap,fmt);          			
    i = vsprintf(buffer,fmt,ap);	                
    va_end(ap);
	
    HAL_UART_Transmit(&huart1,(uint8_t *)buffer,i,0x00ff);
}

void u3_printf(char* fmt,...){
    uint8_t buffer[200];
    uint16_t i;
    va_list ap;
    va_start(ap,fmt);          			
    i = vsprintf(buffer,fmt,ap);	                
    va_end(ap);
	
    HAL_UART_Transmit(&huart1,(uint8_t *)buffer,i,0x00ff);
}

//void u4_printf(char* fmt,...){
//    uint8_t buffer[200];
//    uint16_t i;
//    va_list ap;
//    va_start(ap,fmt);          			
//    i = vsprintf(buffer,fmt,ap);	                
//    va_end(ap);
//	
//    HAL_UART_Transmit(&huart1,(uint8_t *)buffer,i,0x00ff);
//}

//void u5_printf(char* fmt,...){
//    uint8_t buffer[200];
//    uint16_t i;
//    va_list ap;
//    va_start(ap,fmt);          			
//    i = vsprintf(buffer,fmt,ap);	                
//    va_end(ap);
//	
//    HAL_UART_Transmit(&huart1,(uint8_t *)buffer,i,0x00ff);
//}